<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

        <?php 
            $this->LoadHead(); 
            $this->Html->LoadCss("style");
            $this->Html->LoadCss("layout");
        ?>
    
<!-- BODY -->
<body>

        <?php 
            $menu_superior = array(
                'Loja'          => 'loja',
                'Quem Somos'    => 'institucional',
                'Atendimento'   => 'loja/sac/atendimento',
                'Contato'       => 'contato/fale',
            );
            $this->LoadJsPlugin("menu/dropdown", 'mddown');
            $this->mddown->draw($menu_superior, "", "menusuperior");
        ?>
	<div class="clear"></div>
	<div id="header" class="gray rounded marginbottom">
		<h1 id="logo"><a href="index.php">Power Celulares</a></h1>
		<div id="publicidadesuperior">
			<div class="publicidade forma1"> </div>
                        <style>
                            .painel-usuario{float: right;}
                            .painel-usuario a{margin-left: 15px;}
                        </style>
                        <?php 
                            $this->LoadComponent('usuario/login/painel', 'painel');
                            $this->painel->draw($class = "painel-usuario");
                         ?>
		</div>
	</div>
	<div class="clear"></div>	
	<div id="topbar" class="rounded marginbottom">
		<div class="left">Busca:</div>
                <div class="left roundedleft">
                    <?php $url = $this->Html->getLink('');?>
                    <form action='<?php echo $url; ?>' method='get'>
                        <input type="hidden" id="url"    name="url"    value="search" />
                        <input type="hidden" id="page"   name="page"   value="1" />
                        <input type='text'   id='search' name='search' class="left roundedleft"/>
                        <input type='submit' value='Pesquisar' class='btn'/>
                    </form>
                </div>
                <?php if(isset($car)){ ?>
                <div id="carrinho" class="right">
                    <a href="<?php echo $this->Html->getLink("loja/carrinho");?>">
                        CARRINHO (<span id="cart-superior-qtd"><?php echo $car['qtd']; ?></span>) 
                        R$<span id="cart-superior-valor"><?php echo number_format($car['total'], 2, ",", "."); ?></span>
                    </a>
                </div>
                <?php } ?>
		<div class="clear"></div>
	</div>
	
        <div id="publicidademaior">
            <?php 
            if(isset($destaques)){
                $this->LoadComponent("loja/produto/produtos", "pcomp");
                $this->pcomp->draw($destaques, "Destaque", "publicidade forma2 marginbottom"); 
            }
            ?>
        </div>
	<div id="main" class="marginbottom">
                <div id="bar1" class="gray left rounded">
                    <p class="inset">Navegue</p>
                    <?php 
                        if(!isset($menu) || empty($menu)){
                            extract($this->loadLoader("loja"));
                        }
                        $this->LoadJsPlugin("menu/multiple", "mmenu");
                        $this->mmenu->draw($menu);
                    ?>
		</div>
            
                <div id="bar2" class="gray right rounded">
			<div id="publicidadelateral">
				<div class="publicidade forma4 marginbottom"></div>
				<div class="publicidade forma4"></div>
			</div>	
		</div>

                <div id="maincontent">
                    <div id="success"><?php if(isset($success)) echo $success; ?></div>
                    <div id="erro"><?php if(isset($erro)) echo $erro; ?></div>
                    <?php $this->Load('body'); ?>
                </div>
                <div class="clear"></div>
	</div>

	<div id="info" class="rounded gray marginbottom">
		<div class="info">
                    <div class='infotitle inset '>Navegue</div>
                    <div class="infotext">
                        <?php
                            $barra = "";
                            foreach($menu_superior as $m => $v){
                                $link = $this->Html->getLink($v);
                                echo "$barra<a href='$link' class=''>$m</a>";
                                $barra = " | ";
                            }
                        ?>
                            
                    </div>
                    <div class="clear"></div>
		</div>
		<div class="info">
                    <?php 
                        $this->LoadComponent("loja/pagamento/pagamento", 'pgto');
                        $this->pgto->draw("Pagamento");
                    ?>
                    <div class="clear"></div>
		</div>
		<div class="info">
                    <?php 
                        $this->LoadComponent("contato/contato/contato", 'contato');
                        $this->contato->draw("Atendimento");
                    ?>
                    <div class="clear"></div>
		</div>
	</div>
	<div id="footer" class="rounded marginbottom">
		<div class="left">&copy; <?php echo date("Y") . " ";  echo SITE_NOME; ?> - Todos os direitos reservados</div>
		<div class="right">Loja Virtual</div>
		<div class="right" id="siteseguro">Site Seguro</div>
		<div class="clear"></div>
	</div>
		
</body>

</html>